package com.alibaba.dubbo.remoting.http;

import com.alibaba.dubbo.common.extension.ExtensionLoader;

public class HttpBinder$Adpative implements com.alibaba.dubbo.remoting.http.HttpBinder {
    public com.alibaba.dubbo.remoting.http.HttpServer bind(com.alibaba.dubbo.common.URL arg0, com.alibaba.dubbo.remoting.http.HttpHandler arg1) {
        if (arg0 == null) throw new IllegalArgumentException("url == null");
        com.alibaba.dubbo.common.URL url = arg0;
        String extName = url.getParameter("server", "jetty");
        if (extName == null)
            throw new IllegalStateException("Fail to get extension(com.alibaba.dubbo.remoting.http.HttpBinder) name from url(" + url.toString() + ") use keys([server])");
        com.alibaba.dubbo.remoting.http.HttpBinder extension = (com.alibaba.dubbo.remoting.http.HttpBinder) ExtensionLoader.getExtensionLoader(com.alibaba.dubbo.remoting.http.HttpBinder.class).getExtension(extName);
        return extension.bind(arg0, arg1);
    }
}
